# date routines using gawk's strftime built-in
# still incomplete...
# Michael S. Sanders
# license: GPL3

# general

  the_date = strftime("%x") # locale's date
  the_time = strftime("%X") # locale's time
  the_zone = strftime("%Z") # locale's timezone

# minutes/secs

  the_minute = strftime("%M") # minute as decimal (00-59)
  the_second = strftime("%S") # second of minute as decimal (00-60)

# by day/hour

  the_name_of_day     = strftime("%A") # locale's full weekday name
  the_hour_twelve     = strftime("%I") # hour of day 12 format
  the_hour_twentyfour = strftime("%H") # hour of the day 24 format
  the_ampm            = strftime("%p") # locale's equivalent of AM/PM

# by week

  sun_day_of_week = strftime("%w") # weekday as decimal (0-6) starts with Sunday
  mon_day_of_week = strftime("%u") # weekday as decimal (1-7) starts with Monday

# by month

  the_month         = strftime("%m") # month as decimal (01-12)
  the_name_of_month = strftime("%B") # locale's full month name
  the_day_of_month  = strftime("%d") # day of the month as decimal (01-31)

# by year

  the_year         = strftime("%G") # year as decimal (2010)
  the_day_of_year  = strftime("%j") # day of the year as decimal (001-366)
  sun_week_of_year = strftime("%U") # week of year (00-53) starts with Sunday
  mon_week_of_year = strftime("%V") # week of year (01-53) starts with Monday

# eof
